<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-task_title" data-rule="required" class="form-control" name="row[task_title]" type="text">
        </div>
    </div>

    <div class="form-group" data-toggle="cxselect" data-selects="teacherlist,classlist">
        <label class="control-label col-xs-12 col-sm-2">{:__('Teacher Id')}:</label>
        <div class="col-xs-12 col-sm-8">

                <div class="row col-xs-12 col-sm-5">
                    <select class="teacherlist form-control" data-url="task/task/getteacherlist" name="row[teacher_id]" data-rule="required"></select>
                </div>
      
                <div class="col-xs-12 col-sm-7">
                    <label class="control-label col-xs-12 col-sm-4">{:__('ClassId')}:</label>
                    <div class="row col-xs-12 col-sm-8">
                        <select class="classlist form-control" data-rule="required" name="row[classid]" data-url="task/task/getclasslist" data-query-name="teacher_id"></select>
                    </div>
                </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" name="row[price]" type="number" value="0">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit Time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit_time" class="form-control" name="row[unit_time]" type="number" readonly="readonly" value="60">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start Sale')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_sale" class="form-control" name="row[start_sale]" type="number" value="1">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-4">
            {:build_radios('row[status]', ['0'=> __('Normal'), '1'=> __('Disable')])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
